package test4;

import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.Box;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.border.EmptyBorder;
import javax.swing.JButton;

import java.awt.Dimension;
import java.awt.GridBagLayout;
import java.awt.GridBagConstraints;
import java.awt.Insets;
import java.awt.Label;

import javax.swing.BoxLayout;
import javax.swing.GroupLayout;
import javax.swing.GroupLayout.Alignment;
import javax.swing.JSplitPane;

public class TestFrame extends JFrame {
	protected JSplitPane splitPane;
	protected JPanel upPanel;
	protected JScrollPane downPanel;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					TestFrame frame = new TestFrame();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 */
	public TestFrame() {
		initialize();
	}
	private void initialize() {
		setPreferredSize(new Dimension(800, 600));
		setDefaultCloseOperation(DISPOSE_ON_CLOSE);
		
		upPanel = new JPanel();
		downPanel = new JScrollPane();

		JSplitPane horizSplitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, upPanel, downPanel);
		horizSplitPane.setOneTouchExpandable(true);
		horizSplitPane.setContinuousLayout(true);
		setContentPane(horizSplitPane);
		pack();

		setVisible(true);
	}
}
